﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.Text.Editor;

namespace VsSpeakerCompanion.UI
{
    /// <summary>
    /// Provides UI functionality
    /// </summary>
    public interface IUIService
    {
        /// <summary>
        /// Shows a message
        /// </summary>
        /// <param name="message"></param>
        void ShowMessage(string message);

        /// <summary>
        /// Shows an error
        /// </summary>
        /// <param name="errorMessage"></param>
        void ShowError(string errorMessage);
        
        /// <summary>
        /// Shows an exception
        /// </summary>
        /// <param name="exception"></param>
        void ShowError(Exception exception);
        
        /// <summary>
        /// Executes an operation in the UI context changing the mouse cursor and handling the errors
        /// </summary>
        /// <param name="operation"></param>
        /// <returns></returns>
        bool ExecuteOperation(Action operation);
    }
}
